1. Field of the Invention
The invention relates generally to the synchronization of data transmissions over Asynchronous Transfer Mode (ATM) networks, and specifically to a system and method for measuring long-term sample arrival rates in such networks.
2. Description of the Related Art
Standard analog faxes and modems are designed for use over analog telephone lines. However, these lines are expensive to use on a per-channel basis. Therefore, it is common in the industry to use Asynchronous Transfer Mode (ATM) based services for these transmissions, such as Symmetric Digital Subscriber Lines (SDSL), in order to minimize the per channel cost of communication. ATM based services utilize sophisticated modulation schemes to pack data onto copper telephone wires. As a result, a number of analog signals can be combined with digital data for transmission over a single existing copper telephone line.
FIG. 1 is a block diagram of a typical ATM network. Both digital and analog data may be transmitted by a synchronous network platform such as a Public Switched Telephone Network (PSTN) 110. The PSTN 110 includes a network clock 112. The PSTN 110 communicates with a communications hub 120. The communications hub 120 includes a hub codec 122 and a multiplexer/packetizer 124. Digital and analog data are sent from the PSTN 110 to the communications hub 120 where the analog signals are digitized by the hub codec 122. The rate of digitization, or sampling rate, is determined by the network clock 112. The digitized analog signals then pass through the multiplexer/packetizer 124, where the data is encapsulated into packets and sent over the network as a constant bit rate stream using an Asynchronous Transport Service 130, such as SDSL.
FIG. 2 is a block diagram of the receiving side of the ATM network. The data packets are sent over the asynchronous transport service 130 and are received by an Integrated Access Device (IAD) 200. The IAD 200 ultimately separates the digital data from the analog data and sends it on to end user services, such as digital devices 210 or analog devices 220. Examples of analog devices 220 are facsimiles, telephones or modems.
In order for the analog devices 220 to receive the data packets, the IAD 200 must first decode the digitized data. This is done by an IAD codec 206. The IAD codec 206 samples data at a rate determined by an IAD clock 202. Ideally, to achieve accurate and timely decoding, the IAD codec 206 must be made to decode the data at or near the same rate that the hub codec 122 samples the data. As discussed above with reference to FIG. 1, the network clock 112 of the PSTN 110 determines the transmit sampling rate of the hub codec 122. Therefore, in order to synchronize the sampling rate of the hub codec 122 with the sampling rate of the IAD codec 206, it is necessary to synchronize the network clock 112 with the IAD clock 202.
When the IAD codec 206 processes data at a sampling rate that is different from that of the hub codec 122, three problems can arise. First, if the data packets arrive at the IAD codec 206 faster than it can process them, incoming data packets can be lost. Second, if the data packets arrive at the IAD codec 206 slower than it processes them, then undesirable latency occurs in the data stream and the data stream will require “padding”. That is, instead of sending real data packets to the analog devices 220, the IAD codec 206 sends out artificially created packets that are made up of duplicate bits, constant bits or random noise. Finally, for satisfactory performance of most analog fax and modem applications, the sampling rates of the network clock 112 and the IAD clock 202 must match to an accuracy of better than one part per million. The IAD clock 202 needs to provide this precise sampling clock rate recovery and matching even though the rate of the network clock 112 can vary due to the dynamic and unpredictable nature of the asynchronous transport channel. For example, an analog channel sampled at a clock rate of 8000 samples per second at the hub codec 122 would require the IAD codec 206 to match that sampling rate within an accuracy of better than +/−0.008 samples per second. Similarly, a sampling clock rate of 2.048 Megahertz at the hub codec 122 would require a matching clock rate at the IAD codec 206 with an accuracy of better than +/−2.048 Hertz.
Analog signals on ATM-based services are quite satisfactory for most ordinary telephone conversations and occasional glitches (such as data loss or padding) in transmissions over asynchronous services are subjectively unimportant for most voice transmissions. Conversely, however, analog faxes and modems are particularly sensitive to corrupt or lost data, which can cause significant errors.
The network clock 112 is generally very accurate, and therefore the communications hub 120 will transmit digitized data to the IAD 200 at a constant and stable rate. However, due to the nature of asynchronous data protocol and transmission line limitations, the data is not received at the IAD 200 in the same constant and stable rate that it is transmitted. Furthermore, most ATM-based services do not transport synchronization signals, time stamps or a system clock with the data. Thus, the IAD 200 has no information as to the sampling rate of the network clock 112 and cannot directly synchronize the IAD clock 202 accordingly. Thus, in order to successfully conduct long communication sessions for analog faxes or modems in ATM-based networks without direct synchronization methods, the sampling rate of the IAD clock 202 must be synchronized to the sampling rate of the network clock 112 in some other, indirect way.
One method of overcoming this problem is to load the data received by the IAD 200 into a jitter buffer 204 at the full transmit rate. The data can then be clocked out of the jitter buffer 204 by the IAD codec 206 at a predetermined sample rate set by the IAD clock 202. However, when using this method, two degradation problems arise.
First, any time the sampling rate of the IAD clock 202 is offset from the sampling rate of the network clock 112, data packets are going to arrive at the IAD codec 206 either too fast or too slow. When the IAD codec 206 processes data too slow, it causes the jitter buffer 204 to quickly fill up and overflow. Subsequent data packets thus arrive to early for processing by the IAD 200 and data is lost. On the other hand, when the IAD codec 206 processes data too fast, the jitter buffer 204 is quickly depleted. Subsequent data packets arrive too late for processing by the IAD 200. When this happens, the IAD 200 must pad the data stream, as described above.
Second, the use of an inappropriate synchronization method can cause the IAD clock 202 to completely slip out of synchronization with the network clock 112. This deficiency can lead to observable defects on analog end services, such as sound imperfections in acoustic services and visible imperfections in video services.
Therefore, when using this method, there is a limit to how long the jitter buffer 204 can span the differential between clock rates before running out of buffer space. The jitter buffer 204 is limited to a finite length and as such can only accommodate a small mismatch between the clock rates of the network clock 112 and the IAD clock 202. This method is therefore satisfactory only as long as the clocks are in fairly close synchronization so that the data is clocked out of the jitter buffer 204 at roughly the same rate that it is received from the communications hub 120.
A second method attempts to match the clock rate of the IAD clock 202 to the clock rate of the network clock 112 by observing and controlling the rate of accumulation of data packets within the jitter buffer 204 and using a dual-frequency IAD clock 202 to regulate the flow of packets in and out of the buffer to control the rate of accumulation. This method monitors the rate of change and depth of data in the jitter buffer 204 compared to some predetermined threshold. When the data packet accumulation within the jitter buffer 204 exceeds the predetermined threshold, the IAD codec 206 clocks out data from the jitter buffer 204 at the faster of two clock rates. When the data packet accumulation within the jitter buffer 204 drops below the predetermined threshold, the IAD codec 206 clocks data out from the jitter buffer 204 at the slower of two clock rates. This approach is intended to minimize both buffer overflow and underflow, which will cause data errors as described above.
The main problem with this method is that the dual clock frequencies must be chosen with an appropriate differential sufficient to cover the maximum latency period of the network. Also, by definition, the sampling rate of the IAD clock 202 will never be set exactly right; it constantly alternates between being too fast and too slow.
Finally, yet another method uses the same dual-frequency IAD clock 202 discussed above. However, instead of monitoring the level of the jitter buffer 204, this method observes the long-term average arrival rate (AAR) at which data packets arrive at the IAD 200 and subsequently switches between one of two clock rates accordingly. Using this method, the data packets arriving at the IAD 200 are counted over a predetermined time interval. The total number of packets that arrive during the time interval is divided by the time interval, and the AAR is calculated. Thus, AAR=(S*n)/T, where S is the number of samples per packet, n is the number of packets counted and T is the time interval. The resultant AAR is thus an estimated value in samples/second of the sample rate of the hub codec 122. The clock rate of the dual-frequency IAD clock 202 is compared to the AAR, and then adjusted to either the faster or the slower frequency, as appropriate. Although this method does not monitor the jitter buffer 204, the goal is to ideally keep the jitter buffer about half full on the average so it can absorb the temporary mismatches between the AAR and the clock rate of the IAD clock 202.
A problem with this method, however, is shown in FIG. 3. As described, data packets 315 of an ATM packet stream 310 arrive at the IAD 200 and are counted over a fixed time interval, T. The fixed time interval T begins at a start time 330 and ends at a stop time 340. Due to the nature of asynchronous data transmissions, the packets 315 do not arrive at the IAD 200 at a constant rate. Misplaced packets 320 are shown in dashed lines and represent packets that should have arrived at that instance in time.
As can be seen in FIG. 3, the start time 330 and the stop time 340 of the fixed time interval T are completely unsynchronized with the arrival of packets 315 in the ATM packet stream 310. If the start time 330 of the fixed time interval T slips out of synchronization with the arrival of the first data packet 315 of the ATM packet stream 310, the packet count is subject to a plus or minus one-packet error, depending on where the start time 330 occurs relative to the arrival of the first packet 315. Likewise, if the stop time 340 slips out of synchronization with the end of the arrival of the nth packet 315, a similar error occurs. As shown in FIG. 3, a quantization error 350 is introduced into the AAR calculation because the nth packet is counted as a whole data packet, when in fact the whole packet did not fall within time interval T. Conceptually, these errors can occur on both ends of the ATM packet stream 310, essentially doubling the error. Since there are S samples in each data packet 315, the total error in the sample count can be +/−(2*S) samples.
Based on the foregoing, there exists a need for a method to calculate the AAR of packets in a data stream in ATM-based networks in such a way that the quantization error described above is either reduced or eliminated. Removing this error allows the IAD clock 202 to be in constant and accurate synchronization with the network clock 112, eliminating subsequent data loss and padding. Long communication sessions for data sensitive analog faxes or modems in ATM-based networks can thereby occur without the use of direct synchronization or dual frequency clock methods.